Holds information of a tree view item. More...
Public Member Functions | |
| Item () noexcept | |
| virtual | ~Item () |
| Item * | addChild (Item *child) |
| Item * | getChild (unsigned int index) const |
| unsigned int | getChildCount () const |
| bool | isParent () const |
| void | disavowChild (Item *child) |
| void | setText (nkMemory::StringView text) |
| void | setIcon (Image *image) |
| nkMemory::StringView | getText () const |
| Image * | getIcon () const |
| void | setParentTree (TreeView *parent) |
| TreeView * | getParentTree () const |
| void | setParentItem (Item *item) |
| Item * | getParentItem () const |
| void | setAttachedData (void *data) |
| void * | getAttachedData () const |
| bool | getCollapsed () const |
| virtual void | setCollapsed (bool value) |
| void | exportIntrospection (nkExport::Node *rootNode) |
Holds information of a tree view item.
|
noexcept |
Constructor.
|
virtual |
Destructor.
Adds a child item.
| child | The item to add as a child. |
| Item* nkWinUi::TreeView::Item::getChild | ( | unsigned int | index | ) | const |
| index | The index of the item wanted. |
| unsigned int nkWinUi::TreeView::Item::getChildCount | ( | ) | const |
| bool nkWinUi::TreeView::Item::isParent | ( | ) | const |
| void nkWinUi::TreeView::Item::disavowChild | ( | Item * | child | ) |
Makes the item forget about a child.
| child | The item to forget. |
| void nkWinUi::TreeView::Item::setText | ( | nkMemory::StringView | text | ) |
Sets the text displayed for the item.
| text | The text to show. |
| void nkWinUi::TreeView::Item::setIcon | ( | Image * | image | ) |
Sets the icon to use at the front of the item's line.
| image | The image to use. |
| nkMemory::StringView nkWinUi::TreeView::Item::getText | ( | ) | const |
| Image* nkWinUi::TreeView::Item::getIcon | ( | ) | const |
| void nkWinUi::TreeView::Item::setParentTree | ( | TreeView * | parent | ) |
Sets the parent tree view.
| parent | The parent window to set. |
| TreeView* nkWinUi::TreeView::Item::getParentTree | ( | ) | const |
| void nkWinUi::TreeView::Item::setParentItem | ( | Item * | item | ) |
Sets the parent item, if any.
| item | The parent item to set. |
| Item* nkWinUi::TreeView::Item::getParentItem | ( | ) | const |
| void nkWinUi::TreeView::Item::setAttachedData | ( | void * | data | ) |
Sets user data attached to the item.
| data | The data to attach. |
| void* nkWinUi::TreeView::Item::getAttachedData | ( | ) | const |
| bool nkWinUi::TreeView::Item::getCollapsed | ( | ) | const |
|
virtual |
Sets whether an item should be collapsed or not. A collapsed item will hide its descending hierarchy from the view, if any.
| value | Whether the item should be collapsed (true) or not (false). |
| void nkWinUi::TreeView::Item::exportIntrospection | ( | nkExport::Node * | rootNode | ) |
Basic export capabilities.
| rootNode | The tree to export into. |